package cn.lisens.common.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.Session;
import org.hibernate.query.Query;

/**
 * Dao基类接口
 * 
 * @author 孙振国
 * @date 2024年7月17日
 * @param <T>
 * @param <ID>
 */
public interface BaseHQLDao<T, ID extends Serializable> {

	int excuteHql(String hqlString);

	int excuteHql(String hqlString, Map<String, ?> params);

	int excuteSql(String sqlString);

	int excuteSql(String sqlString, Map<String, ?> params);
	
	T getByHQL(String hqlString, Map<String, ?> params);

	<V> V getByHQL(String hqlString, Map<String, ?> params, Class<V> theClass);

	List<T> listByHQL(String hqlString);

	<V> List<V> listByHQL(String hqlString, Class<V> theClass);

	List<T> listByHQL(String hqlString, Map<String, ?> params);

	<V> List<V> listByHQL(String hqlString, Map<String, ?> params, Class<V> theClass);

	List<T> listByHQL(String hqlString, int firstResult, int maxResult);

	<V> List<V> listByHQL(String hqlString, int firstResult, int maxResult, Class<V> theClass);

	List<T> listByHQL(String hqlString, Map<String, ?> params, int firstResult, int maxResult);

	<V> List<V> listByHQL(String hqlString, Map<String, ?> params, int firstResult, int maxResult, Class<V> theClass);
}